<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>Gitee + Hexo 搭建个人博客 | 吴嘉鸿的搬砖笔记</title><meta name="author" content="JiaHong Wu"><meta name="copyright" content="JiaHong Wu"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="Hexo 是一个基于 node.js 的快速生成静态博客的开源框架,支持 Markdown 和大多数 Octopress 插件,一个命令即可部署到 Github 页面、 Giteee、Heroku 等,强大的 APl，可无限扩展，拥有数百个主题和插件。   简单来说就是一个不用你写代码，就能搭建一套属于你自己的个人博客网站 应用（零基础小白也会）。你可以在上面编写文章，做笔记，写日记，码代码。（一">
<meta property="og:type" content="article">
<meta property="og:title" content="Gitee + Hexo 搭建个人博客">
<meta property="og:url" content="https://coderwjh.gitee.io/coderwjh.gitee.io/2022/09/12/Gitee%20+%20Hexo%20%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/index.html">
<meta property="og:site_name" content="吴嘉鸿的搬砖笔记">
<meta property="og:description" content="Hexo 是一个基于 node.js 的快速生成静态博客的开源框架,支持 Markdown 和大多数 Octopress 插件,一个命令即可部署到 Github 页面、 Giteee、Heroku 等,强大的 APl，可无限扩展，拥有数百个主题和插件。   简单来说就是一个不用你写代码，就能搭建一套属于你自己的个人博客网站 应用（零基础小白也会）。你可以在上面编写文章，做笔记，写日记，码代码。（一">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="">
<meta property="article:published_time" content="2022-09-12T02:35:29.000Z">
<meta property="article:modified_time" content="2023-08-11T09:39:28.017Z">
<meta property="article:author" content="JiaHong Wu">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content=""><link rel="shortcut icon" href="/coderwjh.gitee.io/img/favicon.png"><link rel="canonical" href="https://coderwjh.gitee.io/coderwjh.gitee.io/2022/09/12/Gitee%20+%20Hexo%20%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/coderwjh.gitee.io/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/coderwjh.gitee.io/',
  algolia: undefined,
  localSearch: {"path":"/coderwjh.gitee.io/search.xml","preload":true,"languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'Gitee + Hexo 搭建个人博客',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2023-08-11 17:39:28'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 6.2.0"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/coderwjh.gitee.io/img/tx02.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/coderwjh.gitee.io/archives/"><div class="headline">文章</div><div class="length-num">2</div></a><a href="/coderwjh.gitee.io/tags/"><div class="headline">标签</div><div class="length-num">0</div></a><a href="/coderwjh.gitee.io/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/coderwjh.gitee.io/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/coderwjh.gitee.io/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/coderwjh.gitee.io/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/coderwjh.gitee.io/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 清单</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/coderwjh.gitee.io/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/coderwjh.gitee.io/movies/"><i class="fa-fw fas fa-video"></i><span> 电影</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/coderwjh.gitee.io/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/coderwjh.gitee.io/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/coderwjh.gitee.io/">吴嘉鸿的搬砖笔记</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/coderwjh.gitee.io/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/coderwjh.gitee.io/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/coderwjh.gitee.io/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/coderwjh.gitee.io/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 清单</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/coderwjh.gitee.io/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/coderwjh.gitee.io/movies/"><i class="fa-fw fas fa-video"></i><span> 电影</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/coderwjh.gitee.io/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/coderwjh.gitee.io/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">Gitee + Hexo 搭建个人博客</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2022-09-12T02:35:29.000Z" title="发表于 2022-09-12 10:35:29">2022-09-12</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2023-08-11T09:39:28.017Z" title="更新于 2023-08-11 17:39:28">2023-08-11</time></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">3k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>10分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="Gitee + Hexo 搭建个人博客"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><div class="note orange no-icon flat"><p>Hexo 是一个基于 node.js 的快速生成静态博客的开源框架,支持 Markdown 和大多数 Octopress 插件,一个命令即可部署到 Github 页面、 Giteee、Heroku 等,强大的 APl，可无限扩展，拥有数百个主题和插件。</p>
</div>

<div class="note no-icon flat"><p>简单来说就是一个不用你写代码，就能搭建一套属于你自己的个人博客网站 应用（零基础小白也会）。<br>你可以在上面编写文章，做笔记，写日记，码代码。（一个属于你的世界！一个可供别人访问的个人世界）<br>另外 Hexo 还提供了大量主题模版供用户下载。你的博客网站将可以时不时的换一种主题风格，赏心悦目，简直完美！</p>
</div>

<h1 id="环境准备"><a href="#环境准备" class="headerlink" title="环境准备"></a>环境准备</h1><h2 id="安装环境"><a href="#安装环境" class="headerlink" title="安装环境"></a>安装环境</h2><h3 id="Node-js"><a href="#Node-js" class="headerlink" title="Node.js"></a><a target="_blank" rel="noopener" href="https://nodejs.org/en/download/">Node.js</a></h3><p>因为 Hexo 是一款基于 Node.js 的静态博客框架，所以首先要安装 Node.js。<br>● <a target="_blank" rel="noopener" href="http://nodejs.org/">http://nodejs.org/</a> (Node.js 版本需不低于 10.13，建议使用 Node.js 12.0 及以上版本)<br>● Node 自带 npm（以下命令都在 cmd命令窗口 / 开发工具的终端运行即可）<br>● nmp 下载慢的话可以临时通过 config 配置使用淘宝下载源</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">C:\Users\用户名&gt; npm config set registry http://registry.npm.taobao.org</span><br></pre></td></tr></table></figure>

<h3 id="Git"><a href="#Git" class="headerlink" title="Git"></a><a target="_blank" rel="noopener" href="https://git-scm.com/">Git</a></h3><p>Git 是目前世界上最先进的分布式版本控制系统，可以有效、高速的处理从很小到非常大的项目版本管理。而 Hexo 就使用 git 来进行管理和发布。 下面进行安装 git 并连接 GitHub。<br>● 在 Windows 上使用 Git，可以从 Git 官网直接下载安装程序，然后按默认选项安装即可。<br>● 安装完成后，右击鼠标，出现 git bash here，即表示安装成功！<br>● 在 git bush 中输入 git –version 来查看安装的版本号</p>
<figure class="highlight markdown"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ git --version #确认Git安装成功：运行命令查看版本号</span><br><span class="line">git version 2.33.0.windows.2 #笔者是旧版本，安装最新版本即可</span><br></pre></td></tr></table></figure>

<h2 id="搭建步骤"><a href="#搭建步骤" class="headerlink" title="搭建步骤"></a>搭建步骤</h2><p>● Node、Git、Hexo 框架的安装<br>● gitee 个人仓库的创建、SSH 密钥部署<br>● 本地 Hexo 的搭建（并将源代码托管到 gitee 的 “Hexo 博客后台”）<br>● 线上 Hexo 的部署（gitee 的 “Hexo 博客”，实现线上访问博客网站）<br>● 设置个人域名（用 gitee pages 生成的即可）<br>● 在 vscode 编辑并发布文章</p>
<h2 id="相关资料"><a href="#相关资料" class="headerlink" title="相关资料"></a>相关资料</h2><div class="note orange no-icon flat"><p>本文档依据 <a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_45019350/article/details/121901433?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522166252913516781790717621%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=166252913516781790717621&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2alltop_positivedefault-2-121901433-null-null.142%5Ev47%5Econtrol_1,201%5Ev3%5Econtrol_1&utm_term=hexo&spm=1018.2226.3001.4187">参考笔记</a> 改编，该博客采用 <a target="_blank" rel="noopener" href="https://gitee.com/coderwjh">gitee</a> 代码托管平台搭建<br>选用 Hexo 海量主题上的 Butterfly 主题，<a target="_blank" rel="noopener" href="https://butterfly.js.org/">Butterfly</a> 附带了该主题的<a target="_blank" rel="noopener" href="https://butterfly.js.org/posts/21cfbf15/">使用教程</a><br>最终搭建而成的 <a href="https://coderwjh.gitee.io/coderwjh.gitee.io/">线上博客</a> 网址为：<a href="https://coderwjh.gitee.io/coderwjh.gitee.io">https://coderwjh.gitee.io/coderwjh.gitee.io</a><br>其他资源：<a target="_blank" rel="noopener" href="https://blog.csdn.net/qq_34243930/article/details/109046120">目录结构</a> 、<a target="_blank" rel="noopener" href="https://www.bilibili.com/video/BV1Rg41177pX/">视频教程</a>、<a target="_blank" rel="noopener" href="http://www.fontawesome.com.cn/faicons/">字体图标库</a><br>注意：<br>Hexo 博客：gitee 上存放本笔记搭建并打包好的静态资源网站(public)，用来在线展示博客网站<br>Hexo 博客后台：gitee 上存放编辑博客网站的笔记，样式等，可进行增删改查</p>
<p>利用 Hexo d 打包上传 “ Hexo 博客 ” 网站（托管代码并实现在线访问）<br>利用 git push origin master 将项目源代码上传至 “ Hexo 博客后台 ”，方便后续管理维护</p>
</div>

<p><img src="https://img.picgo.net/2022/09/13/7bedf3e0de56103bf43ccb4eebae902c69c1fd742bf0752dcfd98868d4d4f39c.png" alt="背景图"></p>
<!--  -->

<hr>
<h1 id="安装-Hexo"><a href="#安装-Hexo" class="headerlink" title="安装 Hexo"></a>安装 Hexo</h1><p>将 hexo 安装在本地目录，并在本地将项目跑起来，本项目采用 cmd</p>
<div class="note red icon-padding simple"><i class="note-icon fa fa-exclamation-circle"></i><p>除了采用 cmd 命令窗口之外，一些开发工具的终端选项卡也可以用</p>
</div>

<h2 id="安装脚手架"><a href="#安装脚手架" class="headerlink" title="安装脚手架"></a>安装脚手架</h2><p>可以全局安装在 C 盘，也可以只装在 blog 仓库中，如果装在 blog 仓库中，要注意先切换到仓库目录下，如果用的 git 在该目录打开就不用切换</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">// 切换到想要放置项目文件的路径</span><br><span class="line">f:</span><br><span class="line">// 安装</span><br><span class="line">npm install -g hexo-cli</span><br><span class="line">// 查看</span><br><span class="line">hexo -v</span><br></pre></td></tr></table></figure>

<p><img src="https://img.picgo.net/2022/09/13/cli.png" alt="安装脚手架"></p>
<h2 id="初始化"><a href="#初始化" class="headerlink" title="初始化"></a>初始化</h2><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">// 新建存储博客的本地项目</span><br><span class="line">hexo init wjh-blog(git仓库-02)</span><br></pre></td></tr></table></figure>

<p><img src="https://img.picgo.net/2022/09/13/init.png" alt="初始化"></p>
<h2 id="安装-npm"><a href="#安装-npm" class="headerlink" title="安装 npm"></a>安装 npm</h2><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">// 进入 myblog 文件夹</span><br><span class="line">cd myblog</span><br><span class="line">// 安装 node_modules</span><br><span class="line">npm i</span><br></pre></td></tr></table></figure>

<p><img src="https://img.picgo.net/2022/09/13/catelog.png" alt="目录"></p>
<h2 id="启动站点服务"><a href="#启动站点服务" class="headerlink" title="启动站点服务"></a>启动站点服务</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">hexo g</span><br><span class="line">hexo server</span><br></pre></td></tr></table></figure>

<p><img src="https://img.picgo.net/2022/09/13/server.png" alt="启动站点服务"><br>访问 <a target="_blank" rel="noopener" href="http://localhost:4000/">http://localhost:4000/</a> 成功，至此 本地 hero 就搭建好了。<br><img src="https://img.picgo.net/2022/09/13/home.png" alt="网站首页"><br>上面只是在本地预览，接下来要做的就是就是推送网站，也就是发布网站，让我们的网站可以被更多的人访问。</p>
<hr>
<h1 id="访问-Hexo"><a href="#访问-Hexo" class="headerlink" title="访问 Hexo"></a>访问 Hexo</h1><h2 id="新建仓库"><a href="#新建仓库" class="headerlink" title="新建仓库"></a>新建仓库</h2><p>首先得在 github 或者 gitee 上建立仓库，gitee 国内访问快一些，所以采用这个，github 建站方式去查看笔记。<br>路径格式必须是：用户名.gitee.io 只有这样，将来要部署到 Gite e page 的时候，才会被识别，也就是 xxxx.gitee.io，其中 xxx 就是你注册 Gitee 的用户名。<br><img src="https://img.picgo.net/2022/09/13/gitee.png" alt="gitee仓库"></p>
<h2 id="配置-SSH-密钥"><a href="#配置-SSH-密钥" class="headerlink" title="配置 SSH 密钥"></a><a target="_blank" rel="noopener" href="https://docs.qq.com/doc/p/760834036fb711d84a67cbd9d53f1e8a9ceef340?dver=3.0.0">配置 SSH 密钥</a></h2><p>“git 代码管理” 的笔记里有详细解释，这里就不做拓展，重点是配完 SSH 后，利用 git 命令将项目代码上传 gitee 里的 “Hexo 博客后台”，这样方便博客里样式、笔记的修改操作。</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">git init # 初始化本地代码仓，会自动生成隐藏的 .git 文件，在查看里勾选隐藏项目即可看到</span><br><span class="line">git remote add origin git@gitee.com:coderwjh/supermall.git # 配置远程git，将gitee官网与本地git仓库连接起来</span><br><span class="line">git add . # 添加全部本地代码，将文件添加到暂存区</span><br><span class="line">git status # 查看文件状态，以上传的文件呈绿色，未上传的文件曾红色</span><br><span class="line">git commit -m &quot;购物街项目&quot; # 提交前面添加的代码，并且注释为 “购物车项目”</span><br><span class="line">git pull origin master # 下载代码及快速合并</span><br><span class="line">git push origin master # 上传代码及快速合并</span><br></pre></td></tr></table></figure>

<h2 id="安装插件"><a href="#安装插件" class="headerlink" title="安装插件"></a>安装插件</h2><p>将 hexo 博客站点上传到 gitee，这里需要安装一个 hexo 的上传插件</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo-deployer-git --save</span><br></pre></td></tr></table></figure>

<p><img src="https://img.picgo.net/2022/09/13/hexo-deployer-git.png" alt="npm i"></p>
<h2 id="修改配置"><a href="#修改配置" class="headerlink" title="修改配置"></a>修改配置</h2><p>打开 _config.yml 找到 Deploy，添加以下代码，保存并关闭<br><img src="https://img.picgo.net/2022/09/13/config.png" alt="hexo-deployer-git"></p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">deploy:</span><br><span class="line">  type: git</span><br><span class="line">  repo: 你的仓库路径</span><br><span class="line">  branch: master</span><br></pre></td></tr></table></figure>

<p><img src="https://img.picgo.net/2022/09/13/config2.png" alt="仓库路径"></p>
<h2 id="上传博客"><a href="#上传博客" class="headerlink" title="上传博客"></a>上传博客</h2><p>将本地博客站点打包并推送到 gitee 的 “Hexo 博客” 仓库上，这样 gitee 托管着博客网站时也能实现线上访问该博客</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo d</span><br></pre></td></tr></table></figure>

<p>推送中会要求输入gitee的用户名和密码（ 如果不想每次都输可以配置ssh，我这里就不做演示了，之前的 git 笔记里有 ）<br><img src="https://img.picgo.net/2022/09/13/password.png" alt="账户密码"><br>然后就可以看到gitee上有推上来的文件了</p>
<div class="note red icon-padding simple"><i class="note-icon fa fa-exclamation-circle"></i><p>这里只是推送打包生成的静态网站文件，而不是 Hexo 这个框架的源代码</p>
</div>
<p><img src="https://img.picgo.net/2022/09/13/gitee_push.png" alt="打包生成的网站"></p>
<h2 id="配置-Pages-服务"><a href="#配置-Pages-服务" class="headerlink" title="配置 Pages 服务"></a>配置 Pages 服务</h2><p>目前我们站点还无法访问需要开启Gitee Pages（gitee需要开启，github不需要）<br>记得每次写完博客文章后，更新下 Gitee Pages 服务，它不会自动更新的（左下角按钮）<br><img src="https://img.picgo.net/2022/09/13/pages.png" alt="Pages-https"><br>审核通过后，注意还得启动 http 服务，这样就可以在线访问该博客啦<br><img src="https://img.picgo.net/2022/09/13/path.png" alt="url"><br><img src="https://img.picgo.net/2022/09/13/https.png" alt="HTTPS"></p>
<h2 id="配置域名"><a href="#配置域名" class="headerlink" title="配置域名"></a>配置域名</h2><p>访问博客时如果觉得用上面的地址太长，可以给网站配置个域名，将属于自己的域名绑定到 gitee 的服务器上，具体步骤如下：<br>1、 配置域名有关服务（腾讯云服务器官网有资料）<br>2、 进入本地博客文件夹，进入 source 目录，创建一个记事本，输入域名（不需要带www）,保存，命名为 CNAME，注意保存为所有文件而不是 txt 文件。<br>这样就可以用简短的域名访问自己的博客网站了！<br>到此就实现了 gitee + Hexo 博客的基本搭建。后面是定义个性化 Hexo 主题的内容。</p>
<hr>
<h1 id="更换主题"><a href="#更换主题" class="headerlink" title="更换主题"></a>更换主题</h1><p>博客样式太死板，想换成属于自己的风格，没问题我们可以更换博客的主题，来达到我们想要的风格。Hexo 有大量的个性化主题可以使用，选一个喜欢的。<br>这里采用 butterfly 主题，在开头的资料里有提到，然后按照主题文档上面一步步操作即可，git 里 butterfly 的 README.md 看不懂的话可以到主题里的文章查看步骤。<br><img src="https://img.picgo.net/2022/09/13/themes.png" alt="更换主题"><br><img src="https://img.picgo.net/2022/09/13/butterfly.png"><br><img src="https://img.picgo.net/2022/09/13/npm.png"></p>
<h2 id="安装-Butterfly"><a href="#安装-Butterfly" class="headerlink" title="安装 Butterfly"></a>安装 Butterfly</h2><p>1、 通过 Git 将主题安装到仓库，安装路径：wjh-blog(git仓库)\themes\butterfly</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly</span><br></pre></td></tr></table></figure>

<div class="note no-icon flat"><p>这里不推荐 npm i hexo-theme-butterfly 安装方式，因为文件路径比较复杂，如下所示：<br>安装路径：\wjh-blog(git仓库)\node_modules\hexo-theme-butterfly</p>
</div>
<p>2、 在 hexo 的博客根目录，配置文件 _config.yml 中修改 butterfly<br><img src="https://img.picgo.net/2022/09/13/2ba0dcbfd06172e1784f63a69ca2913e.png"><br>3、 将 butterfly 主题里的配置文件 _config.yml 复制到根目录下，并改名为 _config.butterfly.yml，配置 butterfly 样式时修改这个文件里的就可以了，不用修改 themes 里的 butterfly 主题的 _config.yml 文件<br><img src="https://img.picgo.net/2022/09/13/2.png"> -&gt; <img src="https://img.picgo.net/2022/09/13/3.png"><br>4、 hexo server 启动访问<br><img src="https://img.picgo.net/2022/09/13/05b7294f3449c75aa313dcd3d579d856.png"></p>
<h2 id="配置-Butterfly"><a href="#配置-Butterfly" class="headerlink" title="配置 Butterfly"></a>配置 Butterfly</h2><p>通过主题自带的教程自定义喜欢的样式，因为教程已经很全面了，所以这里不再补充<br>包括配置过程中的 bug 解决办法也有，文档如下：</p>
<div class="note orange no-icon flat"><p>关于该主题内部更多样式，请参考主题内的<a target="_blank" rel="noopener" href="https://butterfly.js.org/posts/21cfbf15/">配置文档</a>、<a target="_blank" rel="noopener" href="https://www.yuweizhan.cn/post/975f8665.html">其他配置</a>、<a target="_blank" rel="noopener" href="https://akilar.top/posts/22257072/">生肖图标配置</a></p>
</div>

<hr>
<h1 id="发布文章"><a href="#发布文章" class="headerlink" title="发布文章"></a>发布文章</h1><h2 id="新建文章"><a href="#新建文章" class="headerlink" title="新建文章"></a>新建文章</h2><p>在站点文件夹中打开 git ，输入如下命令创建文章，其中 我的第一篇博客 为文章的标题。hexo 会在 source 文件夹下创建一个 markdowm 的文件，即要编写的文章。</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new &quot;我的第一篇博客&quot;</span><br></pre></td></tr></table></figure>

<p><img src="https://img.picgo.net/2022/09/13/9375d722af43f02e8a1e77a70a44cdac.png"></p>
<div class="note no-icon flat"><p>Markdown 是一种可以使用普通文本编辑器编写的 标记语言，通过简单的 标记语法，它可以使普通文本内容具有一定的格式</p>
<p>基于 Markdown 语法的简洁性，它已经成为目前世界上最流行的用于书写博客的语言</p>
</div>

<h2 id="编写文章"><a href="#编写文章" class="headerlink" title="编写文章"></a>编写文章</h2><p>● hexo 命令方式<br>执行命令 hexo n “第一篇博客” 后，会在D:.吴嘉鸿-资料\wjh-blog（gitee）\source_posts中生成 第一篇博客.md文件，用编辑器打开编写即可。</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo n &quot;文章标题&quot;</span><br></pre></td></tr></table></figure>

<p><img src="https://img.picgo.net/2022/09/13/d685752b56cf51a39a6334c1b4fe8532.png"><br>● 开发工具方式<br>1、 vscode 方式：得安装一些插件才能查看 markdown 语法的网页</p>
<p><a target="_blank" rel="noopener" href="https://www.jianshu.com/p/a117650f6c76?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation">Markdown Preview Enhanced</a>、<a target="_blank" rel="noopener" href="https://www.likecs.com/show-203680685.html">Markdown Shortcuts</a>、<a target="_blank" rel="noopener" href="https://blog.csdn.net/tcr931117355/article/details/116052032">GitLens 显示时间（可不装）</a>、<a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_33895604/article/details/88702076">Markdown All in One 常用快捷键</a></p>
<p>2、 typora 方式：<a target="_blank" rel="noopener" href="https://pan.baidu.com/s/1tkRvnv82YS9lGRG9VLvglQ">typora 破解版(提取码：u2sz)</a>、<a target="_blank" rel="noopener" href="https://www.pandoc.org/installing.html">Pandoc 文件格式转换</a> 插件（百度网盘里也有）、<a target="_blank" rel="noopener" href="https://blog.csdn.net/wangzirui32/article/details/125246778">GitHub + PicGo 图床</a>（因为博客要上传到网络用于展示，插入本地图片的路径没法在线展示图片，所以将 <a target="_blank" rel="noopener" href="https://mp.weixin.qq.com/s?__biz=MzI3NzcwOTY4MQ==&mid=2247484588&idx=1&sn=3471f8b576d65a89d43ddce7daea44af&chksm=eb6352b2dc14dba4e76c2d360653a09146e10c9c62940d2b819b622f2f1b04e7c8d558132d7a&scene=27">github当成图床</a> 的形式来插入图片的网络链接）</p>
<div class="note red icon-padding simple"><i class="note-icon fa fa-exclamation-circle"></i><p>以后一般采用 typora + git 的方式来编写 markdown 文档，并且图床也跟访问博客一样需要在 github 中开启 <a target="_blank" rel="noopener" href="https://blog.csdn.net/m0_37322399/article/details/113777009">Pages</a></p>
<p>注意要使用 Pages + 图片名称：<a target="_blank" rel="noopener" href="https://coder-wujiahong.github.io/images/%E6%96%87%E4%BB%B6%E5%A4%B9%E8%B7%AF%E5%BE%84/%E5%9B%BE%E7%89%87%E5%90%8D%E7%A7%B0">https://coder-wujiahong.github.io/images/文件夹路径/图片名称</a></p>
<p>而不是直接复制 github 上图片的链接（这没用，线上没生效）</p>
</div>

<p>● 主题样式<br>butterfly 样式众多，这里就拿几个常用的使用即可<br><a target="_blank" rel="noopener" href="https://butterfly.js.org/posts/dc584b87/#%E6%A8%99%E7%B1%A4%E9%A0%81">页面创建</a>、<a target="_blank" rel="noopener" href="https://butterfly.js.org/posts/4aa8abbe/#%E6%A8%99%E7%B1%A4%E5%A4%96%E6%8E%9B%EF%BC%88Tag-Plugins%EF%BC%89">标签</a>、<a target="_blank" rel="noopener" href="https://tzy1997.com/articles/hexo1606/">特效</a>、<a target="_blank" rel="noopener" href="http://www.fontawesome.com.cn/faicons/">字体图标库</a>、<a target="_blank" rel="noopener" href="https://akilar.top/posts/22257072/">使用教程4</a>、<a target="_blank" rel="noopener" href="https://www.yuweizhan.cn/post/975f8665.html">使用教程5</a> 等<br>下面以字体图标为例，打开字体图标库，选取对应的图标，然后复制图标名字进代码即可<br><img src="https://img.picgo.net/2022/09/13/icon.png"><br><img src="https://img.picgo.net/2022/09/13/icon2.png"><br><img src="https://img.picgo.net/2022/09/13/icon3.png"><br><img src="https://img.picgo.net/2022/09/13/icon4.png"></p>
<div class="note red icon-padding simple"><i class="note-icon fa fa-exclamation-circle"></i><p>注意：hexo 里访问本地图片的方式试过了都不行，所以采用在线图床的方式访问<br>将本地图片上传到 picgo 里，然后复制网络 url 链接（点击相册、嵌入代码)进行访问</p>
</div>

<h2 id="发布文章-1"><a href="#发布文章-1" class="headerlink" title="发布文章"></a>发布文章</h2><p>本地调试完之后，就可以上传到 gitee 了，这一步跟之前的上传博客一样<br>以后修改了本地的博客后，记得同步到 gitee 里，这样才能在线同步访问</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">//清理 hexo clean    //生成站点文件 hexo g    //部署到服务器 hexo d</span><br></pre></td></tr></table></figure>

<hr>
<h1 id="bug"><a href="#bug" class="headerlink" title="bug"></a>bug</h1><h2 id="线上样式未渲染"><a href="#线上样式未渲染" class="headerlink" title="线上样式未渲染"></a>线上样式未渲染</h2><p>当 butterfly 主题部署好后，将本地代上传到 gitee，并开启 Pages 服务后，通过：<a href="https://coderwjh.gitee.io/coderwjh.gitee.io">https://coderwjh.gitee.io/coderwjh.gitee.io</a> 访问线上博客，发现样式未渲染出来的话，参考此<a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_46187747/article/details/104575042">文章</a>，此时 hexo server 是可以通过 localhost:4000 进行本地访问的。<br>● 参考步骤<br>1、 更改 url 跟添加新的 root<br><img src="https://img.picgo.net/2022/09/13/48f012c567ae56260ef82b51a95ae38c.png"><br>2、 改完配置后重新上传到仓库<br>hexo clean        hexo g        hexo d<br>3、 然后重新开启 Pages 服务<br><img src="https://img.picgo.net/2022/09/13/d4437324090a8cfacddacb0313f5e074.png"><br>4、 重新访问线上博客，点击 shift + F5 强制刷新浏览器缓存</p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="https://coderwjh.gitee.io/coderwjh.gitee.io">JiaHong Wu</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://coderwjh.gitee.io/coderwjh.gitee.io/2022/09/12/Gitee%20+%20Hexo%20%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/">https://coderwjh.gitee.io/coderwjh.gitee.io/2022/09/12/Gitee%20+%20Hexo%20%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://coderwjh.gitee.io/coderwjh.gitee.io" target="_blank">吴嘉鸿的搬砖笔记</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"></div><div class="post_share"><div class="social-share" data-image="" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/js/social-share.min.js" defer></script></div></div><div class="post-reward"><div class="reward-button"><i class="fas fa-qrcode"></i> 打赏</div><div class="reward-main"><ul class="reward-all"><li class="reward-item"><a href="/coderwjh.gitee.io/img/wechat_pay.jpg" target="_blank"><img class="post-qr-code-img" src="/coderwjh.gitee.io/img/wechat_pay.jpg" alt="微信"/></a><div class="post-qr-code-desc">微信</div></li><li class="reward-item"><a href="/coderwjh.gitee.io/img/alipay.jpg" target="_blank"><img class="post-qr-code-img" src="/coderwjh.gitee.io/img/alipay.jpg" alt="支付宝"/></a><div class="post-qr-code-desc">支付宝</div></li></ul></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-full"><a href="/coderwjh.gitee.io/2022/09/12/hello-world/"><img class="prev-cover" src="" onerror="onerror=null;src='/coderwjh.gitee.io/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">Hello World</div></div></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="/coderwjh.gitee.io/img/tx02.jpg" onerror="this.onerror=null;this.src='/coderwjh.gitee.io/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">JiaHong Wu</div><div class="author-info__description"></div></div><div class="card-info-data site-data is-center"><a href="/coderwjh.gitee.io/archives/"><div class="headline">文章</div><div class="length-num">2</div></a><a href="/coderwjh.gitee.io/tags/"><div class="headline">标签</div><div class="length-num">0</div></a><a href="/coderwjh.gitee.io/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://gitee.com/coderwjh/coderwjh.gitee.io"><i class="fab fa-github"></i><span>主题 Gitee</span></a></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">This is my Blog</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87"><span class="toc-number">1.</span> <span class="toc-text">环境准备</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%89%E8%A3%85%E7%8E%AF%E5%A2%83"><span class="toc-number">1.1.</span> <span class="toc-text">安装环境</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#Node-js"><span class="toc-number">1.1.1.</span> <span class="toc-text">Node.js</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Git"><span class="toc-number">1.1.2.</span> <span class="toc-text">Git</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%90%AD%E5%BB%BA%E6%AD%A5%E9%AA%A4"><span class="toc-number">1.2.</span> <span class="toc-text">搭建步骤</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%9B%B8%E5%85%B3%E8%B5%84%E6%96%99"><span class="toc-number">1.3.</span> <span class="toc-text">相关资料</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%AE%89%E8%A3%85-Hexo"><span class="toc-number">2.</span> <span class="toc-text">安装 Hexo</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%89%E8%A3%85%E8%84%9A%E6%89%8B%E6%9E%B6"><span class="toc-number">2.1.</span> <span class="toc-text">安装脚手架</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%88%9D%E5%A7%8B%E5%8C%96"><span class="toc-number">2.2.</span> <span class="toc-text">初始化</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%89%E8%A3%85-npm"><span class="toc-number">2.3.</span> <span class="toc-text">安装 npm</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%90%AF%E5%8A%A8%E7%AB%99%E7%82%B9%E6%9C%8D%E5%8A%A1"><span class="toc-number">2.4.</span> <span class="toc-text">启动站点服务</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E8%AE%BF%E9%97%AE-Hexo"><span class="toc-number">3.</span> <span class="toc-text">访问 Hexo</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%96%B0%E5%BB%BA%E4%BB%93%E5%BA%93"><span class="toc-number">3.1.</span> <span class="toc-text">新建仓库</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%85%8D%E7%BD%AE-SSH-%E5%AF%86%E9%92%A5"><span class="toc-number">3.2.</span> <span class="toc-text">配置 SSH 密钥</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%89%E8%A3%85%E6%8F%92%E4%BB%B6"><span class="toc-number">3.3.</span> <span class="toc-text">安装插件</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BF%AE%E6%94%B9%E9%85%8D%E7%BD%AE"><span class="toc-number">3.4.</span> <span class="toc-text">修改配置</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%B8%8A%E4%BC%A0%E5%8D%9A%E5%AE%A2"><span class="toc-number">3.5.</span> <span class="toc-text">上传博客</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%85%8D%E7%BD%AE-Pages-%E6%9C%8D%E5%8A%A1"><span class="toc-number">3.6.</span> <span class="toc-text">配置 Pages 服务</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%85%8D%E7%BD%AE%E5%9F%9F%E5%90%8D"><span class="toc-number">3.7.</span> <span class="toc-text">配置域名</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E6%9B%B4%E6%8D%A2%E4%B8%BB%E9%A2%98"><span class="toc-number">4.</span> <span class="toc-text">更换主题</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%89%E8%A3%85-Butterfly"><span class="toc-number">4.1.</span> <span class="toc-text">安装 Butterfly</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%85%8D%E7%BD%AE-Butterfly"><span class="toc-number">4.2.</span> <span class="toc-text">配置 Butterfly</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%8F%91%E5%B8%83%E6%96%87%E7%AB%A0"><span class="toc-number">5.</span> <span class="toc-text">发布文章</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%96%B0%E5%BB%BA%E6%96%87%E7%AB%A0"><span class="toc-number">5.1.</span> <span class="toc-text">新建文章</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%BC%96%E5%86%99%E6%96%87%E7%AB%A0"><span class="toc-number">5.2.</span> <span class="toc-text">编写文章</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8F%91%E5%B8%83%E6%96%87%E7%AB%A0-1"><span class="toc-number">5.3.</span> <span class="toc-text">发布文章</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#bug"><span class="toc-number">6.</span> <span class="toc-text">bug</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%BA%BF%E4%B8%8A%E6%A0%B7%E5%BC%8F%E6%9C%AA%E6%B8%B2%E6%9F%93"><span class="toc-number">6.1.</span> <span class="toc-text">线上样式未渲染</span></a></li></ol></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/coderwjh.gitee.io/2022/09/12/Gitee%20+%20Hexo%20%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/" title="Gitee + Hexo 搭建个人博客"><img src="" onerror="this.onerror=null;this.src='/coderwjh.gitee.io/img/404.jpg'" alt="Gitee + Hexo 搭建个人博客"/></a><div class="content"><a class="title" href="/coderwjh.gitee.io/2022/09/12/Gitee%20+%20Hexo%20%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/" title="Gitee + Hexo 搭建个人博客">Gitee + Hexo 搭建个人博客</a><time datetime="2022-09-12T02:35:29.000Z" title="发表于 2022-09-12 10:35:29">2022-09-12</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/coderwjh.gitee.io/2022/09/12/hello-world/" title="Hello World"><img src="" onerror="this.onerror=null;this.src='/coderwjh.gitee.io/img/404.jpg'" alt="Hello World"/></a><div class="content"><a class="title" href="/coderwjh.gitee.io/2022/09/12/hello-world/" title="Hello World">Hello World</a><time datetime="2022-09-12T00:56:24.063Z" title="发表于 2022-09-12 08:56:24">2022-09-12</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2023 By JiaHong Wu</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="translateLink" type="button" title="简繁转换">繁</button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div></div></div><div id="search-mask"></div></div><div><script src="/coderwjh.gitee.io/js/utils.js"></script><script src="/coderwjh.gitee.io/js/main.js"></script><script src="/coderwjh.gitee.io/js/tw_cn.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.min.js"></script><script src="/coderwjh.gitee.io/js/search/local-search.js"></script><div class="js-pjax"></div><script defer="defer" id="ribbon" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/canvas-ribbon.min.js" size="150" alpha="0.6" zIndex="-1" mobile="false" data-click="false"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>